package com.tang;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableEurekaClient
// 允许动态刷新配置，注意调用acturator提供的/refresh端点来刷新配置, 比如curl -X POST
// http://localhost:7031/refresh，配置修改才能在服务端生效
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class,
        HibernateJpaAutoConfiguration.class, RabbitAutoConfiguration.class})
// 去除相应的自动化配置
@EnableTransactionManagement
// 启注解事务管理，等同于xml配置方式的 <tx:annotation-driven />
//@EnableConfigurationProperties(value = { MasterConfig.class, SlaveConfig.class })
@EnableFeignClients
@EnableCircuitBreaker
public class App {
    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }
}
